package com.maxwell.googleplay.holder;

import android.graphics.Color;
import android.view.View;
import android.widget.LinearLayout.LayoutParams;
import android.widget.TextView;

import com.maxwell.googleplay.bean.CategoryInfoBean;
import com.maxwell.googleplay.utils.UIUtils;

/**
 * @author  yue
 * @创建时间 2016-4-3下午9:12:44
 * @描述     TODO
 * 
 */
public class CategoryTitleHolder extends BaseHolder<CategoryInfoBean>{

	private TextView mTvTitle;

	@Override
	public View initHolderView() {
		mTvTitle = new TextView(UIUtils.getContext());
		mTvTitle.setTextSize(16);
		mTvTitle.setTextColor(Color.GRAY);
		int padding = UIUtils.dip2px(5);
		mTvTitle.setPadding(padding, padding, padding, padding);
		mTvTitle.setBackgroundColor(Color.WHITE);
		LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
		mTvTitle.setLayoutParams(params);
		return mTvTitle;
	}

	@Override
	public void refreshHolderView(CategoryInfoBean data) {
		
		mTvTitle.setText(data.title);
		
	}

}
